from flask import request, jsonify
from server.nurse import ratings_list_server
from api import ratings_list_api

@ratings_list_api.route('/read', methods=['GET'])
def read():
    result = ratings_list_server.list_read()
    return result

@ratings_list_api.route('/delete', methods=['POST'])
def delead():
    data = request.json
    result = ratings_list_server.id_delete(data)
    return result

@ratings_list_api.route('/add', methods=['POST'])
def add():
    data = request.json
    result = ratings_list_server.add(data)
    return result

@ratings_list_api.route('/update', methods=['POST'])
def update():
    data = request.json
    result = ratings_list_server.update(data)
    return result

